package com.steakliu.consumer.controller;

import com.steakliu.interfaces.UserServiceInterface;
import com.steakliu.interfaces.domain.User;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 功能说明：
 * <p>
 * Original @Author: steakliu-刘牌, 2022-07-30  18:31
 * <p>
 * Copyright (C)2020-2022  steakliu All rights reserved.
 */
@RestController
public class UserController {

    @DubboReference(protocol = "dubbo")
    private UserServiceInterface userServiceInterface;

    @GetMapping("/getUser")
    public User getUser(){
        return userServiceInterface.getUser("1");
    }

    @GetMapping("/xss")
    public String xss(){
        return "<script>alert("+123+")</script>";
    }
}
